﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using ZyanCom = Zyan.Communication;

namespace ES.Shared.Hosting
{
    public class ComponentCatalog
    {
        private volatile ZyanCom.ComponentCatalog _catalog;

        private ComponentCatalog()
        {
            _catalog = new ZyanCom.ComponentCatalog();            
        }

        private static object _lockObject = new object();
        private volatile static ComponentCatalog _singleton;

        public static ComponentCatalog Instance
        {
            get
            {
                if (_singleton == null)
                {
                    lock (_lockObject)
                    {
                        if (_singleton == null)
                            _singleton = new ComponentCatalog();
                    }
                }
                return _singleton;
            }
        }
    }
}
